fix(linux): fix KDE hotkey not registering at startup#498
Closed
xAlcahest wants to merge 2 commits into
Closed
Conversation
On Electron 39+, appendSwitch("ozone-platform-hint", "x11") has no
effect — the ozone platform is selected during Chromium init, before
any JS runs. This causes the app to silently start on native Wayland
on KDE, breaking overlay positioning, focus, and always-on-top.
Self-relaunch with --ozone-platform=x11 before require("electron")
is the only way to get the flag onto the native command line in time.
Force XWayland on KDE via self-relaunch, load userData .env early for DICTATION_KEY, skip KGlobalAccel D-Bus on XWayland and register hotkey from env var before page load. Increase clipboard restore delay for KDE Wayland clipboard bridge.
3 tasks
Collaborator
|
Closing — all fixes from this PR have been superseded by the work in #451 (
Thanks for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Based on c6d3cf8 from #495.
On KDE Wayland with Electron 39, the hotkey didn't work until you manually re-set it in settings. KGlobalAccel D-Bus silently accepted the registration but never fired the shortcut signal.
The fix forces XWayland on KDE (where globalShortcut works via X11) and loads the saved hotkey from the userData .env early enough to register it before the page finishes loading.
What changed: